<md-dialog id="unis" flex="50" ng-cloak  >
    <form class="light-theme"  novalidate name="editForm" ng-submit="editForm.$valid && submit()">
        <md-toolbar>
            <div class="md-toolbar-tools">
                <h1>Edit Replenishment Task</h1>
                <span flex></span>
                <i class="fa fa-times" ng-click="cancel()"></i>
            </div>
        </md-toolbar>
        <md-dialog-content style="min-height: 200px; overflow: visible;">
            <div class="form-horizontal">
                <div class="grid-100 grid-content" >
                    <div class="grid-parent grid-100 container">
                        <label class="grid-25 label-input">Planned Assignee: </label>
                        <div class="grid-75">
                            <input-validation-message field="plannedAssignee" form="editForm"></input-validation-message>
                            <user-auto-complete name="plannedAssignee" on-select="onSelectUser(user)"
                                                ng-model="task.plannedAssigneeUserId" required="true"></user-auto-complete>
                        </div>
                    </div>
                    <div class="grid-parent grid-100 container">
                        <label class="grid-25 label-input">Priority: </label>
                        <div class="grid-75">
                            <task-priority-auto-complete ng-model="task.priority"></task-priority-auto-complete>
                        </div>
                    </div>
                </div>
            </div>
        </md-dialog-content>
        <md-dialog-actions style="padding: 0">
            <div class="grid-100 grid-content">
                <div class="grid-100 grid-parent container">
                    <div class="grid-100">
                        <div style="color: red; ">{{ errorMsg }}</div>
                    </div>
                </div>
                <div class="grid-100 grid-parent container">
                    <unis-waitting-btn ng-type="submit" value="'Save'" is-loading="saving"
                        btn-class="grid-10 ripplelink pull-right button-between" ></unis-waitting-btn>
                    <button type="button" class="grid-10 cancel pull-right" ng-click="cancel()">Cancel</button>
                </div>
            </div>
        </md-dialog-actions>
    </form>
</md-dialog>
